<?php 

//facebook api
define("API_KEY","3e99105ed5c922110fb95eeb507e1599");
define("SERERCT_KEY","fa104a2e1f7d83328599406adbe7cbf1");
//database config
define("DATABASE_HOST","localhost");
define("DATABASE_USER","root");
define("DATABASE_PASS","password");
define("DATABASE_NAME","facebook");

include("FacebookGame.php");


//init function for redirect to call function
function request_geteway($request )
{	
	
	
	if(!isset($request['session_key']))
	{	
		echo "unknow session key";
		return;
	}
	
	
	$html="";
	$fg= new  FacebookGame($request);
	switch($method)
		{
		
		case "get.freinds" :$html = $fg->get_friends();
		 	break;
		case "get.query" : //$html = $fb->get_query($request);
			break;
		default :
		    $html = "Unknow method";
		}
		
		echo $html;

}
request_geteway($_REQUEST);





